package com.sayice.design.State;

public class Closed implements TCP{
    @Override
    public void ReactionToEstablished() {
        System.out.println("已关闭");
    }
    @Override
    public void ReactionToListening() {
        System.out.println("已关闭");
    }
    @Override
    public void ReactionToClosed() {
        System.out.println("已关闭");
    }
    @Override
    public void request(TCP tcp) {
        if(tcp instanceof Listening)
            ReactionToListening();
        else if(tcp instanceof Established)
            ReactionToEstablished();
        else
            ReactionToClosed();
    }
}
